package win.larryzeal.util;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Collection;

public class FileUtil {
	/**
	 * 
	 * @param fileName
	 * @param collection
	 * @throws FileNotFoundException
	 */
	public static void writeLinesToFile(String fileName, Collection<String> collection) throws FileNotFoundException {
		PrintWriter pw = new PrintWriter(fileName);
		collection.forEach(e -> {
			pw.println(e);
		});
		pw.flush();
		pw.close();
	}
}
